package com.windea.study.kotlin.javafx.helloworld2

import javafx.application.*
import javafx.fxml.*
import javafx.scene.*
import javafx.stage.*

class MyApplication : Application() {
	override fun start(stage: Stage) {
		//从指定的url读取fxml
		val root = FXMLLoader.load<Parent>(javaClass.getResource("/MyScene.fxml"))
		//设置舞台的标题
		stage.title = "My Application"
		//设置舞台的场景
		stage.scene = Scene(root)
		//显示舞台
		stage.show()
	}
}

fun main(args: Array<String>) {
	Application.launch(MyApplication::class.java, *args)
}
